<?php
namespace app\api\model;

use app\common\model\Record as RecordModel;

/**
 * 交易记录模型
 */
class Record extends RecordModel
{
	/**
     * 新增
    */ 
    public function add($order, $action)
    {
    	$data = [
            'order_no' => $order['order_no'],
            'money' => $order['pay_price'],
            'user_id' => $order['user_id'],
            'shop_id' => $order['shop_id'],
            'applet_id' => $order['applet_id'],
            'action' => $action,
            'remark' => '订单支付'
        ];
        return $this->save($data);
    }
}
